#
# @lc app=leetcode.cn id=125 lang=python3
#
# [125] 验证回文串
#

# @lc code=start
class Solution:
    def isPalindrome(self, s: str) -> bool:
        s=s.lower()
        s2=[]
        for i in s:
            if 'a'<=i<='z' or i.isdigit():
                s2.append(i)
        if len(s2)==1:
            return True
        for i in range(int(len(s2)/2)):
            if s2[i]!=s2[len(s2)-i-1]:
                return False
        return True

# @lc code=end

